3.332 \(\int \frac{a+b \log (c x^n)}{d+\frac{e}{x}} \, dx\)

Optimal. Leaf size=69 \[ -\frac{b e n \text{PolyLog}\left (2,-\frac{d x}{e}\right )}{d^2}-\frac{e \log \left (\frac{d x}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2}+\frac{a x}{d}+\frac{b x \log \left (c x^n\right )}{d}-\frac{b n x}{d} \]

[Out]

(a*x)/d - (b*n*x)/d + (b*x*Log[c*x^n])/d - (e*(a + b*Log[c*x^n])*Log[1 + (d*x)/e])/d^2 - (b*e*n*PolyLog[2, -((
d*x)/e)])/d^2

________________________________________________________________________________________

Rubi [A]  time = 0.0780385, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {193, 43, 2330, 2295, 2317, 2391} \[ -\frac{b e n \text{PolyLog}\left (2,-\frac{d x}{e}\right )}{d^2}-\frac{e \log \left (\frac{d x}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2}+\frac{a x}{d}+\frac{b x \log \left (c x^n\right )}{d}-\frac{b n x}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(d + e/x),x]

[Out]

(a*x)/d - (b*n*x)/d + (b*x*Log[c*x^n])/d - (e*(a + b*Log[c*x^n])*Log[1 + (d*x)/e])/d^2 - (b*e*n*PolyLog[2, -((
d*x)/e)])/d^2

Rule 193

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b}, x] && LtQ[n, 0]
 && IntegerQ[p]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2330

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = Expand
Integrand[(a + b*Log[c*x^n])^p, (d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}
, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{a+b \log \left (c x^n\right )}{d+\frac{e}{x}} \, dx &=\int \left (\frac{a+b \log \left (c x^n\right )}{d}-\frac{e \left (a+b \log \left (c x^n\right )\right )}{d (e+d x)}\right ) \, dx\\ &=\frac{\int \left (a+b \log \left (c x^n\right )\right ) \, dx}{d}-\frac{e \int \frac{a+b \log \left (c x^n\right )}{e+d x} \, dx}{d}\\ &=\frac{a x}{d}-\frac{e \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{d x}{e}\right )}{d^2}+\frac{b \int \log \left (c x^n\right ) \, dx}{d}+\frac{(b e n) \int \frac{\log \left (1+\frac{d x}{e}\right )}{x} \, dx}{d^2}\\ &=\frac{a x}{d}-\frac{b n x}{d}+\frac{b x \log \left (c x^n\right )}{d}-\frac{e \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{d x}{e}\right )}{d^2}-\frac{b e n \text{Li}_2\left (-\frac{d x}{e}\right )}{d^2}\\ \end{align*}

Mathematica [A]  time = 0.0324424, size = 66, normalized size = 0.96 \[ \frac{-b e n \text{PolyLog}\left (2,-\frac{d x}{e}\right )-a e \log \left (\frac{d x}{e}+1\right )+a d x+b \log \left (c x^n\right ) \left (d x-e \log \left (\frac{d x}{e}+1\right )\right )-b d n x}{d^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(d + e/x),x]

[Out]

(a*d*x - b*d*n*x - a*e*Log[1 + (d*x)/e] + b*Log[c*x^n]*(d*x - e*Log[1 + (d*x)/e]) - b*e*n*PolyLog[2, -((d*x)/e
)])/d^2

________________________________________________________________________________________

Maple [C]  time = 0.193, size = 343, normalized size = 5. \begin{align*}{\frac{b\ln \left ({x}^{n} \right ) x}{d}}-{\frac{b\ln \left ({x}^{n} \right ) e\ln \left ( dx+e \right ) }{{d}^{2}}}-{\frac{bnx}{d}}-{\frac{enb}{{d}^{2}}}+{\frac{enb\ln \left ( dx+e \right ) }{{d}^{2}}\ln \left ( -{\frac{dx}{e}} \right ) }+{\frac{enb}{{d}^{2}}{\it dilog} \left ( -{\frac{dx}{e}} \right ) }+{\frac{{\frac{i}{2}}b\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}e\ln \left ( dx+e \right ) }{{d}^{2}}}+{\frac{{\frac{i}{2}}b\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) x}{d}}-{\frac{{\frac{i}{2}}b\pi \,{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}e\ln \left ( dx+e \right ) }{{d}^{2}}}+{\frac{{\frac{i}{2}}b\pi \,{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}x}{d}}-{\frac{{\frac{i}{2}}b\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}x}{d}}-{\frac{{\frac{i}{2}}b\pi \,{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) x}{d}}+{\frac{{\frac{i}{2}}b\pi \,{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) e\ln \left ( dx+e \right ) }{{d}^{2}}}-{\frac{{\frac{i}{2}}b\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) e\ln \left ( dx+e \right ) }{{d}^{2}}}+{\frac{\ln \left ( c \right ) bx}{d}}-{\frac{b\ln \left ( c \right ) e\ln \left ( dx+e \right ) }{{d}^{2}}}+{\frac{ax}{d}}-{\frac{ae\ln \left ( dx+e \right ) }{{d}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/(d+e/x),x)

[Out]

b*ln(x^n)/d*x-b*ln(x^n)*e/d^2*ln(d*x+e)-b*n*x/d-b*n*e/d^2+b*n*e/d^2*ln(d*x+e)*ln(-d*x/e)+b*n*e/d^2*dilog(-d*x/
e)+1/2*I*b*Pi*csgn(I*c*x^n)^3*e/d^2*ln(d*x+e)+1/2*I*b*Pi*csgn(I*c*x^n)^2*csgn(I*c)/d*x-1/2*I*b*Pi*csgn(I*x^n)*
csgn(I*c*x^n)^2*e/d^2*ln(d*x+e)+1/2*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2/d*x-1/2*I*b*Pi*csgn(I*c*x^n)^3/d*x-1/2*
I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)/d*x+1/2*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*e/d^2*ln(d*x+e)-
1/2*I*b*Pi*csgn(I*c*x^n)^2*csgn(I*c)*e/d^2*ln(d*x+e)+b*ln(c)/d*x-b*ln(c)*e/d^2*ln(d*x+e)+a*x/d-a*e/d^2*ln(d*x+
e)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a{\left (\frac{x}{d} - \frac{e \log \left (d x + e\right )}{d^{2}}\right )} + b \int \frac{x \log \left (c\right ) + x \log \left (x^{n}\right )}{d x + e}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e/x),x, algorithm="maxima")

[Out]

a*(x/d - e*log(d*x + e)/d^2) + b*integrate((x*log(c) + x*log(x^n))/(d*x + e), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b x \log \left (c x^{n}\right ) + a x}{d x + e}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e/x),x, algorithm="fricas")

[Out]

integral((b*x*log(c*x^n) + a*x)/(d*x + e), x)

________________________________________________________________________________________

Sympy [A]  time = 59.7241, size = 144, normalized size = 2.09 \begin{align*} - \frac{a e \left (\begin{cases} \frac{x}{e} & \text{for}\: d = 0 \\\frac{\log{\left (d x + e \right )}}{d} & \text{otherwise} \end{cases}\right )}{d} + \frac{a x}{d} + \frac{b e n \left (\begin{cases} \frac{x}{e} & \text{for}\: d = 0 \\\frac{\begin{cases} \log{\left (e \right )} \log{\left (x \right )} - \operatorname{Li}_{2}\left (\frac{d x e^{i \pi }}{e}\right ) & \text{for}\: \left |{x}\right | < 1 \\- \log{\left (e \right )} \log{\left (\frac{1}{x} \right )} - \operatorname{Li}_{2}\left (\frac{d x e^{i \pi }}{e}\right ) & \text{for}\: \frac{1}{\left |{x}\right |} < 1 \\-{G_{2, 2}^{2, 0}\left (\begin{matrix} & 1, 1 \\0, 0 & \end{matrix} \middle |{x} \right )} \log{\left (e \right )} +{G_{2, 2}^{0, 2}\left (\begin{matrix} 1, 1 & \\ & 0, 0 \end{matrix} \middle |{x} \right )} \log{\left (e \right )} - \operatorname{Li}_{2}\left (\frac{d x e^{i \pi }}{e}\right ) & \text{otherwise} \end{cases}}{d} & \text{otherwise} \end{cases}\right )}{d} - \frac{b e \left (\begin{cases} \frac{x}{e} & \text{for}\: d = 0 \\\frac{\log{\left (d x + e \right )}}{d} & \text{otherwise} \end{cases}\right ) \log{\left (c x^{n} \right )}}{d} - \frac{b n x}{d} + \frac{b x \log{\left (c x^{n} \right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/(d+e/x),x)

[Out]

-a*e*Piecewise((x/e, Eq(d, 0)), (log(d*x + e)/d, True))/d + a*x/d + b*e*n*Piecewise((x/e, Eq(d, 0)), (Piecewis
e((log(e)*log(x) - polylog(2, d*x*exp_polar(I*pi)/e), Abs(x) < 1), (-log(e)*log(1/x) - polylog(2, d*x*exp_pola
r(I*pi)/e), 1/Abs(x) < 1), (-meijerg(((), (1, 1)), ((0, 0), ()), x)*log(e) + meijerg(((1, 1), ()), ((), (0, 0)
), x)*log(e) - polylog(2, d*x*exp_polar(I*pi)/e), True))/d, True))/d - b*e*Piecewise((x/e, Eq(d, 0)), (log(d*x
 + e)/d, True))*log(c*x**n)/d - b*n*x/d + b*x*log(c*x**n)/d

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b \log \left (c x^{n}\right ) + a}{d + \frac{e}{x}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e/x),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)/(d + e/x), x)